package cn.chinaflame.pagodas.exception;

import cn.chinaflame.pagodas.enums.ResultEnum;

/**
 * spring框架对 RuntimeException 才会进行事物的回滚
 *
 * @author admin
 */
public class BoyException extends RuntimeException {
    /**
     *
     */
    private static final long serialVersionUID = -5070957286765180825L;
    private String code;

    public BoyException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}
